package org.jboss.seam.wiki.core.preferences.template;

import org.jboss.seam.wiki.preferences.PreferenceValueTemplate;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;
import java.io.Serializable;

@Component("rolesPreferenceValueTemplate")
public class RolesTemplate implements PreferenceValueTemplate, Serializable {

    /**
	 * 
	 */
	private static final long serialVersionUID = -5830618981391948190L;
	private List<String> roleNames;

    public List<String> getTemplateValues() {
        if (roleNames == null) {
            roleNames = new ArrayList<String>();
//            List<Role> rolesList = (List<Role>) Component.getInstance("rolesList");
//            for (Role role : rolesList) {
//                roleNames.add(role.getName());
//            }
        }
        return roleNames;
    }

}